#ifndef _APPLICATION_H_H_
#define _APPLICATION_H_H_


#include "MenuH.h"
#include <windows.h>
#include <conio.h>
#include <iostream>
#include "rectangleH.h"
#include "ScreenH.h"
#include "Animation_H.h"
#include "Shape.h"
#include <typeinfo.h>


class Application
{
	Menu generalMenu, rectangleMenu, shapeMenu;
	int choiceG, choiceR, choiceS;
	enum eDisplayType {WITH_OVERLAP, WITHOUT_OVERLAP}; //Default Display Type for Drawing
	enum eAnimationType {WITHOUT_BORDERS, WITH_BORDERS};
	//RectangleSTLList RectangleL; // New list
	list<Rectangl *> L;  // ** should be converted to shape future - currently for testing
	list<Rectangl *> L2; // ** should be converted to shape future - currently for testing
	list<Shape *> listShape;
	list<Shape *> listShapeTemp;
	int sizeOfList;
	//Animation rectangleAnimation;
	
public:

	Application()
	{
		init();
	}
    
	~Application();

	void init();

	void applicationRun();
	
	void setDisplayType(eDisplayType type){displayType=type;};
	
	void setAnimationType(eAnimationType type){animationType=type;};

	bool isPointExistInList(int x, int y, Shape ** recOut);

	bool removeFromList(Shape * r);

	void AppGeneralFirstChoice();

	void AppGeneralSecondChoice();

	void AppGeneralThirdChoice();

	void AddGeneralFourthChoice();

	void AddGeneralFifthChoice();

	void AddGeneralSixChoice();

	void Application::goMenuRectangle(Shape * r, int x, int y);

	void AppRectangleSecondChoice(Shape * r);

	void AppRectangleThirdChoice(Shape * r);
	
	void AppRectangleFourthChoice(Shape * r);

	void AppRectangleFifthChoice(Shape * r);

	void goAndDrawPointFromUser(int x, int y, char c);

	void AppRectangleSixChoice(Shape * r);
	
	void AppRectangleSevenChoice(Shape *r);

	void AppShapeFirstChoice();

	void AppShapeSecondChoice();
	
	void copyShapeList(list<Shape*> sourcelst, list<Shape*> copylst);

	void freeShapeList(list<Shape*> lst);



private:

	eDisplayType displayType; 

	eAnimationType animationType;
};



#endif